home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / pp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-31  |  659 b   |  35 lines

  1. /*
  2.    pp: pretty print the command structure.
  3.  
  4.    Kenneth Ingham
  5.  
  6.    Copyright (C) 1987 The University of New Mexico
  7. */
  8.  
  9. #include "defs.h"
  10.  
  11. pp(clist)
  12. struct cmd_st *clist;
  13. {
  14.     extern char *histfilename;
  15.     extern char *controlname;
  16.     extern char *myname;
  17.  
  18.     printf("%s %s\n", myname, VERSION);
  19.     printf("History file name: %s\n", histfilename);
  20.     printf("Control file name: %s\n", controlname);
  21.     printf("\n\n");
  22.  
  23.     while (clist != NULL) {
  24.         printf("( %s )", clist->pipeline);
  25.         if (clist->alias[0])
  26.             printf(" { '%s' }\n", clist->alias);
  27.         else
  28.             printf("\n");
  29.         pp_out(clist->out_fmt);
  30.         printf(" :\n");
  31.         pp_change(clist->change_fmt);
  32.         clist = clist->next;
  33.     }
  34. }
  35.